﻿using System;
using System.Globalization;
using Bookvar.ServiceModel;

namespace Bookvar.UI.Localization
{
    public class LocalizationService : ILocalizationService
    {
        /// <summary>
        /// Gets or sets the current culture.
        /// </summary>
        /// <value>The current culture.</value>
        public CultureInfo CurrentCulture
        {
            get
            {
                return Resources.Culture;
            }
            set
            {
                if(value == null)
                {
                    throw new ArgumentNullException("value");
                }

                Resources.Culture = value;
            }
        }
    }
}
